﻿using System;
using StarTrek.Ship;
using StarTrek.Space;

namespace StarTrek.World
{
    public class InvalidFlightPath:ApplicationException
    {
        private iSpaceItem target;
        private iShip vessel;

        public InvalidFlightPath(){}
        public InvalidFlightPath(iShip Used):this()
        {
            vessel = Used;    
        }
        public InvalidFlightPath(iShip Used, iSpaceItem Target)
            : this(Used)
        {
            target = Target;
        }

        public override string Message
        {
            get
            {
                return string.Format("The location, {0}, can not be traveled to by the vessel,{1}.",target.ToString(), vessel.ShipName);
            }
        }
    }
}
